package viz
{
	public class StateConstants	{
		
		public static const STATE_ASSEMBLY:String = "state/assembly";
		public static const STATE_PREPARATION:String = "state/preparation";
		public static const STATE_DISPLAYING:String = "state/displaying";
		public static const STATE_EDITING:String = "state/editing";
		public static const STATE_SAVING:String = "state/saving";
		public static const STATE_OPENING:String = "state/opening";
		public static const STATE_LOCKED:String = "state/locked";

		public static const ACTION_ASSEMBLED:String = "action/assembled";
		public static const ACTION_PREPARED:String = "action/prepared";
		public static const ACTION_DISPLAY:String = "action/display";
		public static const ACTION_EDIT:String = "action/edit";
		public static const ACTION_OPEN:String = "action/open";
		public static const ACTION_SAVE:String = "action/save";
		public static const ACTION_LOCK:String = "action/lock";		
		
		public static const CHANGED_ASSEMBLY:String = "changed/assembly";
		public static const CHANGED_PREPARATION:String = "changed/preparation";
		public static const CHANGED_DISPLAYING:String = "changed/displaying";
		public static const CHANGED_EDITING:String = "changed/edit";
		public static const CHANGED_OPENING:String = "changed/opening";
		public static const CHANGED_SAVING:String = "changed/saving";
		public static const CHANGED_LOCK:String = "changed/lock";
		
		public static const  FSM_DECLARATION:XML = 
            <fsm initial={STATE_ASSEMBLY}>
           
               <state 	name={STATE_ASSEMBLY} 
               			changed={CHANGED_ASSEMBLY}>
	                   	<transition action={ACTION_ASSEMBLED} 
	                   				target={STATE_PREPARATION}
	                   />
               </state>
                <state 	name={STATE_PREPARATION} 
               			changed={CHANGED_PREPARATION}>
	                   	<transition action={ACTION_PREPARED} 
	                   				target={STATE_DISPLAYING}
	                   />
               </state>
               <state 	name={STATE_DISPLAYING}
               			changed={CHANGED_DISPLAYING}>
               			<transition action={ACTION_OPEN} 
	                   				target={STATE_OPENING}
	                   	/>
	                   	<transition action={ACTION_SAVE} 
	                   				target={STATE_SAVING}
	                   	/>
	                   	<transition action={ACTION_EDIT} 
	                   				target={STATE_EDITING}
	                   	/>
	            </state>
               
               <state 	name={STATE_EDITING}
               			changed={CHANGED_EDITING}>
               			<transition action={ACTION_DISPLAY}
	                   				target={STATE_DISPLAYING}
	                   	/>
	                   	
	           </state>        	
	           <state 	name={STATE_OPENING}
               			changed={CHANGED_OPENING}>
               			<transition action={ACTION_DISPLAY}
	                   				target={STATE_DISPLAYING}
	                   	/>    
               </state>
               <state 	name={STATE_SAVING}
               			changed={CHANGED_SAVING}>
               			<transition action={ACTION_DISPLAY}
	                   				target={STATE_DISPLAYING}
	                   	/>    
               </state>
               
                <state 	name={STATE_LOCKED}
               			changed={CHANGED_LOCK}>
               			<transition action={ACTION_DISPLAY}
	                   				target={STATE_DISPLAYING}
	                   	/>
               </state>

        	</fsm>;
		
		
	}
}